<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        /*
            封装一个函数, 根据参数输出内容
        */

        function fn(n, m) {
        // code run here ...
        }

        /*
        fn(5, 7)
            1  10  11  20  21  30  31
            2  9   12  19  22  29  32
            3  8   13  18  23  28  33
            4  7   14  17  24  27  34
            5  6   15  16  25  26  35
        */
    </script>
</body>
</html>